package com.example.soss.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotBlank;

@Data
@TableName("t_course")
public class Course {

    @TableId(type = IdType.AUTO)
    private int id;

    @NotBlank(message = "课程名称不能为空！")
    private String name;
    @Range(message = "开课人数最少20，最大50", min = 20, max = 50)
    private int amount;
    @NotBlank(message = "教师名称不能为空！")
    private String teacher;
    private int status;
}
